package com.semidata.trp.report.report;

import java.util.HashMap;
import java.util.Map;

public class PersonalData {
	private String uid;
	private ReportUnit totalReport = new ReportUnit();
	private Map<Integer, ReportUnit> mediaReport = new HashMap<Integer, ReportUnit>();
	private Map<Integer, ReportUnit> mediaTypeReport = new HashMap<Integer, ReportUnit>();
	private Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
	private Map<Integer, ReportUnit> orgReport = new HashMap<Integer, ReportUnit>();
	private Map<Integer, ReportUnit> resReport = new HashMap<Integer, ReportUnit>();
	private Map<Integer, Map<Integer, ReportUnit>> orgMediaReport = new HashMap<Integer, Map<Integer, ReportUnit>>();
	private Map<Integer, Map<Integer, ReportUnit>> orgMediaTypeReport = new HashMap<Integer, Map<Integer, ReportUnit>>();
	private Map<Integer, Map<Integer, ReportUnit>> orgResReport = new HashMap<Integer, Map<Integer, ReportUnit>>();
	private Map<Integer, Map<Integer, ReportUnit>> orgPosReport = new HashMap<Integer, Map<Integer, ReportUnit>>();
	private Map<Integer, Map<Integer, ReportUnit>> orgStraReport = new HashMap<Integer, Map<Integer, ReportUnit>>();
	private Map<Integer, Map<Integer, ReportUnit>> straPosReport = new HashMap<Integer, Map<Integer, ReportUnit>>();
	private Map<Integer, Map<Integer, ReportUnit>> straMediaTypeReport = new HashMap<Integer, Map<Integer, ReportUnit>>();
	private Map<Integer, Map<Integer, ReportUnit>> straResReport = new HashMap<Integer, Map<Integer, ReportUnit>>();

	public ReportUnit getTotalReport() {
		return totalReport;
	}

	public void setTotalReport(ReportUnit totalReport) {
		this.totalReport = totalReport;
	}

	public void addTotalReportPv(long value) {
		this.totalReport.addPv(value);
	}

	public void addTotalReportClick(long value) {
		this.totalReport.addClick(value);
	}

	public void addTotalReportCost(double value) {
		this.totalReport.addCost(value);
	}

	public Map<Integer, ReportUnit> getMediaReport() {
		return mediaReport;
	}

	public void setMediaReport(Map<Integer, ReportUnit> mediaReport) {
		this.mediaReport = mediaReport;
	}

	public void addMediaReportPv(int id, long value) {
		if (mediaReport.get(id) == null) {
			this.mediaReport.put(id, new ReportUnit());
		}
		this.mediaReport.get(id).addPv(value);
	}

	public void addMediaReportClick(int id, long value) {
		if (mediaReport.get(id) == null) {
			this.mediaReport.put(id, new ReportUnit());
		}
		this.mediaReport.get(id).addClick(value);
	}

	public void addMediaReportCost(int id, double value) {
		if (mediaReport.get(id) == null) {
			this.mediaReport.put(id, new ReportUnit());
		}
		this.mediaReport.get(id).addCost(value);
	}

	public Map<Integer, ReportUnit> getPosReport() {
		return posReport;
	}

	public void setPosReport(Map<Integer, ReportUnit> posReport) {
		this.posReport = posReport;
	}

	public void addPosReportPv(int id, long value) {
		if (posReport.get(id) == null) {
			this.posReport.put(id, new ReportUnit());
		}
		this.posReport.get(id).addPv(value);
	}

	public void addPosReportClick(int id, long value) {
		if (posReport.get(id) == null) {
			this.posReport.put(id, new ReportUnit());
		}
		this.posReport.get(id).addClick(value);
	}

	public void addPosReportCost(int id, double value) {
		if (posReport.get(id) == null) {
			this.posReport.put(id, new ReportUnit());
		}
		this.posReport.get(id).addCost(value);
	}

	public Map<Integer, ReportUnit> getOrgReport() {
		return orgReport;
	}

	public void setOrgReport(Map<Integer, ReportUnit> orgReport) {
		this.orgReport = orgReport;
	}

	public void addOrgReportPv(int id, long value) {
		if (orgReport.get(id) == null) {
			this.orgReport.put(id, new ReportUnit());
		}
		this.orgReport.get(id).addPv(value);
	}

	public void addOrgReportClick(int id, long value) {
		if (orgReport.get(id) == null) {
			this.orgReport.put(id, new ReportUnit());
		}
		this.orgReport.get(id).addClick(value);
	}

	public void addOrgReportCost(int id, double value) {
		if (orgReport.get(id) == null) {
			this.orgReport.put(id, new ReportUnit());
		}
		this.orgReport.get(id).addCost(value);
	}

	public Map<Integer, Map<Integer, ReportUnit>> getOrgMediaReport() {
		return orgMediaReport;
	}

	public void setOrgMediaReport(
			Map<Integer, Map<Integer, ReportUnit>> orgMediaReport) {
		this.orgMediaReport = orgMediaReport;
	}

	public void addOrgMediaReportPv(int orgId, int mediaId, long value) {
		if (orgMediaReport.get(orgId) == null) {
			Map<Integer, ReportUnit> mediaReport = new HashMap<Integer, ReportUnit>();
			mediaReport.put(mediaId, new ReportUnit());
			this.orgMediaReport.put(orgId, mediaReport);
		} else if (orgMediaReport.get(orgId).get(mediaId) == null) {
			this.orgMediaReport.get(orgId).put(mediaId, new ReportUnit());
		}
		this.orgMediaReport.get(orgId).get(mediaId).addPv(value);
	}

	public void addOrgMediaReportClick(int orgId, int mediaId, long value) {
		if (orgMediaReport.get(orgId) == null) {
			Map<Integer, ReportUnit> mediaReport = new HashMap<Integer, ReportUnit>();
			mediaReport.put(mediaId, new ReportUnit());
			this.orgMediaReport.put(orgId, mediaReport);
		} else if (orgMediaReport.get(orgId).get(mediaId) == null) {
			this.orgMediaReport.get(orgId).put(mediaId, new ReportUnit());
		}
		this.orgMediaReport.get(orgId).get(mediaId).addClick(value);
	}

	public void addOrgMediaReportCost(int orgId, int mediaId, double value) {
		if (orgMediaReport.get(orgId) == null) {
			Map<Integer, ReportUnit> mediaReport = new HashMap<Integer, ReportUnit>();
			mediaReport.put(mediaId, new ReportUnit());
			this.orgMediaReport.put(orgId, mediaReport);
		} else if (orgMediaReport.get(orgId).get(mediaId) == null) {
			this.orgMediaReport.get(orgId).put(mediaId, new ReportUnit());
		}
		this.orgMediaReport.get(orgId).get(mediaId).addCost(value);
	}

	public Map<Integer, Map<Integer, ReportUnit>> getOrgPosReport() {
		return orgPosReport;
	}

	public void setOrgPosReport(
			Map<Integer, Map<Integer, ReportUnit>> orgPosReport) {
		this.orgPosReport = orgPosReport;
	}

	public void addOrgPosReportPv(int orgId, int posId, long value) {
		if (orgPosReport.get(orgId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.orgPosReport.put(orgId, posReport);
		} else if (orgPosReport.get(orgId).get(posId) == null) {
			this.orgPosReport.get(orgId).put(posId, new ReportUnit());
		}
		this.orgPosReport.get(orgId).get(posId).addPv(value);
	}

	public void addOrgPosReportClick(int orgId, int posId, long value) {
		if (orgPosReport.get(orgId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.orgPosReport.put(orgId, posReport);
		} else if (orgPosReport.get(orgId).get(posId) == null) {
			this.orgPosReport.get(orgId).put(posId, new ReportUnit());
		}
		this.orgPosReport.get(orgId).get(posId).addClick(value);
	}

	public void addOrgPosReportCost(int orgId, int posId, double value) {
		if (orgPosReport.get(orgId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.orgPosReport.put(orgId, posReport);
		} else if (orgPosReport.get(orgId).get(posId) == null) {
			this.orgPosReport.get(orgId).put(posId, new ReportUnit());
		}
		this.orgPosReport.get(orgId).get(posId).addCost(value);
	}

	public Map<Integer, Map<Integer, ReportUnit>> getOrgStraReport() {
		return orgStraReport;
	}

	public void setOrgStraReport(
			Map<Integer, Map<Integer, ReportUnit>> orgStraReport) {
		this.orgStraReport = orgStraReport;
	}

	public void addOrgStraReportPv(int orgId, int straId, long value) {
		if (orgStraReport.get(orgId) == null) {
			Map<Integer, ReportUnit> straReport = new HashMap<Integer, ReportUnit>();
			straReport.put(straId, new ReportUnit());
			this.orgStraReport.put(orgId, straReport);
		} else if (orgStraReport.get(orgId).get(straId) == null) {
			this.orgStraReport.get(orgId).put(straId, new ReportUnit());
		}
		this.orgStraReport.get(orgId).get(straId).addPv(value);
	}

	public void addOrgStraReportClick(int orgId, int straId, long value) {
		if (orgStraReport.get(orgId) == null) {
			Map<Integer, ReportUnit> straReport = new HashMap<Integer, ReportUnit>();
			straReport.put(straId, new ReportUnit());
			this.orgStraReport.put(orgId, straReport);
		} else if (orgStraReport.get(orgId).get(straId) == null) {
			this.orgStraReport.get(orgId).put(straId, new ReportUnit());
		}
		this.orgStraReport.get(orgId).get(straId).addClick(value);
	}

	public void addOrgStraReportCost(int orgId, int straId, double value) {
		if (orgStraReport.get(orgId) == null) {
			Map<Integer, ReportUnit> straReport = new HashMap<Integer, ReportUnit>();
			straReport.put(straId, new ReportUnit());
			this.orgStraReport.put(orgId, straReport);
		} else if (orgStraReport.get(orgId).get(straId) == null) {
			this.orgStraReport.get(orgId).put(straId, new ReportUnit());
		}
		this.orgStraReport.get(orgId).get(straId).addCost(value);
	}

	public Map<Integer, Map<Integer, ReportUnit>> getStraPosReport() {
		return straPosReport;
	}

	public void setStraPosReport(
			Map<Integer, Map<Integer, ReportUnit>> straPosReport) {
		this.straPosReport = straPosReport;
	}

	public void addStraPosReportPv(int straId, int posId, long value) {
		if (straPosReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straPosReport.put(straId, posReport);
		} else if (straPosReport.get(straId).get(posId) == null) {
			this.straPosReport.get(straId).put(posId, new ReportUnit());
		}
		this.straPosReport.get(straId).get(posId).addPv(value);
	}

	public void addStraPosReportClick(int straId, int posId, long value) {
		if (straPosReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straPosReport.put(straId, posReport);
		} else if (straPosReport.get(straId).get(posId) == null) {
			this.straPosReport.get(straId).put(posId, new ReportUnit());
		}
		this.straPosReport.get(straId).get(posId).addClick(value);
	}

	public void addStraPosReportCost(int straId, int posId, double value) {
		if (straPosReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straPosReport.put(straId, posReport);
		} else if (straPosReport.get(straId).get(posId) == null) {
			this.straPosReport.get(straId).put(posId, new ReportUnit());
		}
		this.straPosReport.get(straId).get(posId).addCost(value);
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public void merge(PersonalData perData) {
		// TODO Auto-generated method stub
		mergeTotalReport(perData.getTotalReport());
		mergeMediaReport(perData.getMediaReport());
		mergeMediaTypeReport(perData.getMediaTypeReport());
		mergePosReport(perData.getPosReport());
		mergeOrgReport(perData.getOrgReport());
		mergeResReport(perData.getResReport());
		mergeOrgMediaReport(perData.getOrgMediaReport());
		mergeOrgMediaTypeReport(perData.getOrgMediaTypeReport());
		mergeOrgResReport(perData.getOrgResReport());
		mergeOrgPosReport(perData.getOrgPosReport());
		mergeOrgStraReport(perData.getOrgStraReport());
		mergeStraMediaTypeReport(perData.getStraMediaTypeReport());
		mergeStraResReport(perData.getStraResReport());
		mergeStraPosReport(perData.getStraPosReport());
	}

	private void mergeOrgPosReport(Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (orgPosReport.get(entry.getKey()) == null) {
				orgPosReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = orgPosReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				orgPosReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeStraPosReport(
			Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (straPosReport.get(entry.getKey()) == null) {
				straPosReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = straPosReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				straPosReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeStraResReport(
			Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (straResReport.get(entry.getKey()) == null) {
				straResReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = straResReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				straResReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeStraMediaTypeReport(
			Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (straMediaTypeReport.get(entry.getKey()) == null) {
				straMediaTypeReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = straMediaTypeReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				straMediaTypeReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeOrgStraReport(
			Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (orgStraReport.get(entry.getKey()) == null) {
				orgStraReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = orgStraReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				orgStraReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeOrgResReport(Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (orgResReport.get(entry.getKey()) == null) {
				orgResReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = orgResReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				orgResReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeOrgMediaTypeReport(
			Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (orgMediaTypeReport.get(entry.getKey()) == null) {
				orgMediaTypeReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = orgMediaTypeReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				orgMediaTypeReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeOrgMediaReport(
			Map<Integer, Map<Integer, ReportUnit>> report) {
		// TODO Auto-generated method stub
		Map<Integer, ReportUnit> report2 = null;
		for (Map.Entry<Integer, Map<Integer, ReportUnit>> entry : report
				.entrySet()) {
			if (orgMediaReport.get(entry.getKey()) == null) {
				orgMediaReport.put(entry.getKey(), entry.getValue());
			} else {
				report2 = orgMediaReport.get(entry.getKey());
				for (Map.Entry<Integer, ReportUnit> entry2 : entry.getValue()
						.entrySet()) {
					if (report2.get(entry2.getKey()) == null) {
						report2.put(entry2.getKey(), entry2.getValue());
					} else {
						report2.get(entry2.getKey()).merge(entry2.getValue());
					}
				}
				orgMediaReport.put(entry.getKey(), report2);
			}
		}
	}

	private void mergeResReport(Map<Integer, ReportUnit> report) {
		// TODO Auto-generated method stub
		for (Map.Entry<Integer, ReportUnit> entry : report.entrySet()) {
			if (resReport.get(entry.getKey()) == null) {
				resReport.put(entry.getKey(), entry.getValue());
			} else {
				resReport.get(entry.getKey()).merge(entry.getValue());
			}
		}
	}

	private void mergeOrgReport(Map<Integer, ReportUnit> report) {
		// TODO Auto-generated method stub
		for (Map.Entry<Integer, ReportUnit> entry : report.entrySet()) {
			if (orgReport.get(entry.getKey()) == null) {
				orgReport.put(entry.getKey(), entry.getValue());
			} else {
				orgReport.get(entry.getKey()).merge(entry.getValue());
			}
		}
	}

	private void mergePosReport(Map<Integer, ReportUnit> report) {
		// TODO Auto-generated method stub
		for (Map.Entry<Integer, ReportUnit> entry : report.entrySet()) {
			if (posReport.get(entry.getKey()) == null) {
				posReport.put(entry.getKey(), entry.getValue());
			} else {
				posReport.get(entry.getKey()).merge(entry.getValue());
			}
		}
	}

	private void mergeMediaTypeReport(Map<Integer, ReportUnit> report) {
		// TODO Auto-generated method stub
		for (Map.Entry<Integer, ReportUnit> entry : report.entrySet()) {
			if (mediaTypeReport.get(entry.getKey()) == null) {
				mediaTypeReport.put(entry.getKey(), entry.getValue());
			} else {
				mediaTypeReport.get(entry.getKey()).merge(entry.getValue());
			}
		}
	}

	private void mergeMediaReport(Map<Integer, ReportUnit> report) {
		// TODO Auto-generated method stub
		for (Map.Entry<Integer, ReportUnit> entry : report.entrySet()) {
			if (mediaReport.get(entry.getKey()) == null) {
				mediaReport.put(entry.getKey(), entry.getValue());
			} else {
				mediaReport.get(entry.getKey()).merge(entry.getValue());
			}
		}
	}

	private void mergeTotalReport(ReportUnit reportUnit) {
		// TODO Auto-generated method stub
		totalReport.merge(reportUnit);

	}

	public Map<Integer, ReportUnit> getMediaTypeReport() {
		return mediaTypeReport;
	}

	public void setMediaTypeReport(Map<Integer, ReportUnit> mediaTypeReport) {
		this.mediaTypeReport = mediaTypeReport;
	}

	public void addMediaTypeReportPv(int id, long value) {
		if (mediaTypeReport.get(id) == null) {
			this.mediaTypeReport.put(id, new ReportUnit());
		}
		this.mediaTypeReport.get(id).addPv(value);
	}

	public void addMediaTypeReportClick(int id, long value) {
		if (mediaTypeReport.get(id) == null) {
			this.mediaTypeReport.put(id, new ReportUnit());
		}
		this.mediaTypeReport.get(id).addClick(value);
	}

	public void addMediaTypeReportCost(int id, double value) {
		if (mediaTypeReport.get(id) == null) {
			this.mediaTypeReport.put(id, new ReportUnit());
		}
		this.mediaTypeReport.get(id).addCost(value);
	}

	public Map<Integer, Map<Integer, ReportUnit>> getOrgMediaTypeReport() {
		return orgMediaTypeReport;
	}

	public void setOrgMediaTypeReport(
			Map<Integer, Map<Integer, ReportUnit>> orgMediaTypeReport) {
		this.orgMediaTypeReport = orgMediaTypeReport;
	}

	public void addOrgMediaTypeReportPv(int orgId, int mediaId, long value) {
		if (orgMediaTypeReport.get(orgId) == null) {
			Map<Integer, ReportUnit> mediaReport = new HashMap<Integer, ReportUnit>();
			mediaReport.put(mediaId, new ReportUnit());
			this.orgMediaTypeReport.put(orgId, mediaReport);
		} else if (orgMediaTypeReport.get(orgId).get(mediaId) == null) {
			this.orgMediaTypeReport.get(orgId).put(mediaId, new ReportUnit());
		}
		this.orgMediaTypeReport.get(orgId).get(mediaId).addPv(value);
	}

	public void addOrgMediaTypeReportClick(int orgId, int mediaId, long value) {
		if (orgMediaTypeReport.get(orgId) == null) {
			Map<Integer, ReportUnit> mediaReport = new HashMap<Integer, ReportUnit>();
			mediaReport.put(mediaId, new ReportUnit());
			this.orgMediaTypeReport.put(orgId, mediaReport);
		} else if (orgMediaTypeReport.get(orgId).get(mediaId) == null) {
			this.orgMediaTypeReport.get(orgId).put(mediaId, new ReportUnit());
		}
		this.orgMediaTypeReport.get(orgId).get(mediaId).addClick(value);
	}

	public void addOrgMediaTypeReportCost(int orgId, int mediaId, double value) {
		if (orgMediaTypeReport.get(orgId) == null) {
			Map<Integer, ReportUnit> mediaReport = new HashMap<Integer, ReportUnit>();
			mediaReport.put(mediaId, new ReportUnit());
			this.orgMediaTypeReport.put(orgId, mediaReport);
		} else if (orgMediaTypeReport.get(orgId).get(mediaId) == null) {
			this.orgMediaTypeReport.get(orgId).put(mediaId, new ReportUnit());
		}
		this.orgMediaTypeReport.get(orgId).get(mediaId).addCost(value);
	}

	public Map<Integer, Map<Integer, ReportUnit>> getStraMediaTypeReport() {
		return straMediaTypeReport;
	}

	public void setStraMediaTypeReport(
			Map<Integer, Map<Integer, ReportUnit>> straMediaTypeReport) {
		this.straMediaTypeReport = straMediaTypeReport;
	}

	public void addStraMediaTypeReportPv(int straId, int posId, long value) {
		if (straMediaTypeReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straMediaTypeReport.put(straId, posReport);
		} else if (straMediaTypeReport.get(straId).get(posId) == null) {
			this.straMediaTypeReport.get(straId).put(posId, new ReportUnit());
		}
		this.straMediaTypeReport.get(straId).get(posId).addPv(value);
	}

	public void addStraMediaTypeReportClick(int straId, int posId, long value) {
		if (straMediaTypeReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straMediaTypeReport.put(straId, posReport);
		} else if (straMediaTypeReport.get(straId).get(posId) == null) {
			this.straMediaTypeReport.get(straId).put(posId, new ReportUnit());
		}
		this.straMediaTypeReport.get(straId).get(posId).addClick(value);
	}

	public void addStraMediaTypeReportCost(int straId, int posId, double value) {
		if (straMediaTypeReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straMediaTypeReport.put(straId, posReport);
		} else if (straMediaTypeReport.get(straId).get(posId) == null) {
			this.straMediaTypeReport.get(straId).put(posId, new ReportUnit());
		}
		this.straMediaTypeReport.get(straId).get(posId).addCost(value);
	}

	public Map<Integer, ReportUnit> getResReport() {
		return resReport;
	}

	public void addResReportPv(int id, long value) {
		if (resReport.get(id) == null) {
			this.resReport.put(id, new ReportUnit());
		}
		this.resReport.get(id).addPv(value);
	}

	public void addResReportClick(int id, long value) {
		if (resReport.get(id) == null) {
			this.resReport.put(id, new ReportUnit());
		}
		this.resReport.get(id).addClick(value);
	}

	public void addResReportCost(int id, double value) {
		if (resReport.get(id) == null) {
			this.resReport.put(id, new ReportUnit());
		}
		this.resReport.get(id).addCost(value);
	}

	public void setResReport(Map<Integer, ReportUnit> resReport) {
		this.resReport = resReport;
	}

	public Map<Integer, Map<Integer, ReportUnit>> getOrgResReport() {
		return orgResReport;
	}

	public void addOrgResReportPv(int straId, int posId, long value) {
		if (orgResReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.orgResReport.put(straId, posReport);
		} else if (orgResReport.get(straId).get(posId) == null) {
			this.orgResReport.get(straId).put(posId, new ReportUnit());
		}
		this.orgResReport.get(straId).get(posId).addPv(value);
	}

	public void addOrgResReportClick(int straId, int posId, long value) {
		if (orgResReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.orgResReport.put(straId, posReport);
		} else if (orgResReport.get(straId).get(posId) == null) {
			this.orgResReport.get(straId).put(posId, new ReportUnit());
		}
		this.orgResReport.get(straId).get(posId).addClick(value);
	}

	public void addOrgResReportCost(int straId, int posId, double value) {
		if (orgResReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.orgResReport.put(straId, posReport);
		} else if (orgResReport.get(straId).get(posId) == null) {
			this.orgResReport.get(straId).put(posId, new ReportUnit());
		}
		this.orgResReport.get(straId).get(posId).addCost(value);
	}

	public void setOrgResReport(
			Map<Integer, Map<Integer, ReportUnit>> orgResReport) {
		this.orgResReport = orgResReport;
	}

	public Map<Integer, Map<Integer, ReportUnit>> getStraResReport() {
		return straResReport;
	}

	public void addStraResReportPv(int straId, int posId, long value) {
		if (straResReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straResReport.put(straId, posReport);
		} else if (straResReport.get(straId).get(posId) == null) {
			this.straResReport.get(straId).put(posId, new ReportUnit());
		}
		this.straResReport.get(straId).get(posId).addPv(value);
	}

	public void addStraResReportClick(int straId, int posId, long value) {
		if (straResReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straResReport.put(straId, posReport);
		} else if (straResReport.get(straId).get(posId) == null) {
			this.straResReport.get(straId).put(posId, new ReportUnit());
		}
		this.straResReport.get(straId).get(posId).addClick(value);
	}

	public void addStraResReportCost(int straId, int posId, double value) {
		if (straResReport.get(straId) == null) {
			Map<Integer, ReportUnit> posReport = new HashMap<Integer, ReportUnit>();
			posReport.put(posId, new ReportUnit());
			this.straResReport.put(straId, posReport);
		} else if (straResReport.get(straId).get(posId) == null) {
			this.straResReport.get(straId).put(posId, new ReportUnit());
		}
		this.straResReport.get(straId).get(posId).addCost(value);
	}

	public void setStraResReport(
			Map<Integer, Map<Integer, ReportUnit>> straResReport) {
		this.straResReport = straResReport;
	}

	public void clear() {
		// TODO Auto-generated method stub
		totalReport.clear();
		mediaReport.clear();
		mediaTypeReport.clear();
		posReport.clear();
		orgReport.clear();
		resReport.clear();
		orgMediaReport.clear();
		orgMediaTypeReport.clear();
		orgResReport.clear();
		orgPosReport.clear();
		orgStraReport.clear();
		straPosReport.clear();
		straMediaTypeReport.clear();
		straResReport.clear();
	}

}
